# !/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2025/07/25 9:00
# @Author  : Yida Hao
# @File    : main.py

"""
Main entry point for the policy management module.
Launches the action prediction service
"""

import rclpy
from rclpy.executors import MultiThreadedExecutor
from policy_management.pred_joint_action_srv import PredJointActionService

def main(args=None):
    rclpy.init()

    pred_action_service = PredJointActionService()
    
    # WARN: should use rclpy.spin while using Ascend om model, otherwise will get context errors
    executor = MultiThreadedExecutor()
    executor.add_node(pred_action_service)

    executor.spin()

    pred_action_service.destroy_node()

    rclpy.shutdown()

